package com.damuzee.core.web.springmvc;

import java.beans.PropertyEditorSupport;
import java.text.ParseException;
import java.util.Date;

import org.springframework.util.StringUtils;

public class IntegerEtraTypeEditor extends PropertyEditorSupport{
	
	public void setAsText(String text) throws IllegalArgumentException {
		text = text.trim();
		if (text.equals("off")) {
			setValue(0);
		} else if(text.equals("on")) {
			setValue(1);
		} 
	}
 
	public String getAsText() {
		return getValue().toString();
	}
}
